package com.wei.czz.common.vo.blog;

import com.wei.czz.common.jsr303.group.Save;
import com.wei.czz.common.jsr303.group.Update;
import com.wei.czz.common.tool.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wei
 * date: 2025-01-20 21:20
 * className: BlogVo 博客请求参数Vo类
 * version: 2.0
 * description:
 */
@Getter
@Setter
public class BlogVo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    private Long id;

    /**
     * 用户空间主键
     */
    @NotNull(message = "用户空间主键不能为空", groups = { Save.class, Update.class })
    private Long spaceId;

    /**
     * 标题
     */
    @NotEmpty(message = "标题不能为空", groups = { Save.class, Update.class })
    private String title;

    /**
     * 导读文字
     */
    @NotEmpty(message = "导读文字不能为空", groups = { Save.class, Update.class })
    private String guide;

    /**
     * 首图地址
     */
    @NotEmpty(message = "首图地址不能为空", groups = { Save.class, Update.class })
    private String firstPicture;

    /**
     * 标记[0-原创 1-转载 2-翻译]
     */
    @NotNull(message = "标记不能为空", groups = { Save.class, Update.class })
    private Integer label;

    /**
     * 版权模块是否开启
     */
    @NotNull(message = "版权模块是否开启不能为空", groups = { Save.class, Update.class })
    private Integer showStatement;

    /**
     * 是否开启评论
     */
    @NotNull(message = "是否开启评论不能为空", groups = { Save.class, Update.class })
    private Integer openComment;

    /**
     * 正文内容
     */
    @NotEmpty(message = "正文内容不能为空", groups = { Save.class, Update.class })
    private String content;

    /**
     * 博客标签列表
     */
    @NotEmpty(message = "博客标签列表不能为空", groups = { Save.class, Update.class })
    private List<String> tagList;

}
